home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr05
/
makecard.zip
/
MAKECARD.DOC
< prev
next >
Wrap
Text File
|
1993-07-06
|
2KB
|
46 lines
MAKECARD.BAS creates a Windows 3.1 Cardfile from an ASCII text file.
Input consists of an ASCII text file with the following characteristics:
. Index lines (the headers on the Cardfile cards) are marked
by an asterisk (*) in the first column. The asterisk is cut
from the line before the cardfile is assembled.
. There are up to 11 text lines following the index line. If
there are more than 11 lines, a warning appears and any extra
lines are ignored.
. All lines are a maximum of 40 characters long.
Such a file can be created with any word processor capable
of saving files as ASCII text. For example, in WordPerfect 5.1,
you specify a left margin of 0 and a right margin of 4.5 to get
a 40 character line, assuming that 10-pitch Courier is your
base font. Edit your file, then save it as DOS text.
The program is written as a QBASIC program. It currently is set up
to run a maximum of 100 cards (1100 text lines), but this can be
changed to whatever is needed. To run MAKECARD, copy it to whatever
directory includes QBASIC (usually the DOS directory). Start it by
clicking on it in DOS Shell or Windows File Manager or other launcher
that recognized a .BAS file as a QBASIC program. Or, start it by
giving the following command from the DOS prompt:
QBASIC /RUN MAKECARD
The program will ask for the input file (a sample called NASA.TXT
is included), the output file (should be given the extension .CRD),
and whether you want the program to sort the index lines. NOTE:
the program does not check to see if the output file name already
exists, so beware of overwriting an existing file inadvertently.
That's it! I wrote this little routine to speed some file work I
was doing. Please pardon the utter lack of structure to the
program, or use it as a negative example with students. No claims
are made, nor any warranties given.
Let me know if you found it at all useful. Send mail to:
Bruce Clouette 71053,1652 on CompuServe
(INTERNET: 71053.1652.compuserve.com)